﻿using System;
using System.Collections.Generic;
using System.Text;

namespace OkTool.Date
{
    public class DatePattern
    {

        /// <summary>
        /// 标准日期格式：yyyyMMddHHmmss
        /// </summary>
        public static string PURE_DATETIME_PATTERN = "yyyyMMddHHmmss";

        /// <summary>
        /// 标准日期格式：yyyyMMddHHmmssSSS
        /// </summary>
        public static string PURE_DATETIME_MS_PATTERN = "yyyyMMddHHmmssSSS";

        
        /// <summary>
        /// 标准日期格式：yyyyMMdd
        /// </summary>
        public static string PURE_DATE_PATTERN = "yyyyMMdd";


        /// <summary>
        /// 标准日期格式：HHmmss
        /// </summary>
        public static  string PURE_TIME_PATTERN = "HHmmss";

        /// <summary>
        /// 标准日期时间格式，精确到分：yyyy-MM-dd HH:mm
        /// </summary>

        public static  string NORM_DATETIME_MINUTE_PATTERN = "yyyy-MM-dd HH:mm";

        /// <summary>
        /// 标准日期时间格式，精确到毫秒：yyyy-MM-dd HH:mm:ss.SSS
        /// </summary>
        public static string NORM_DATETIME_MS_PATTERN = "yyyy-MM-dd HH:mm:ss.SSS";
        /// <summary>
        /// 标准日期格式：yyyy-MM-dd
        /// </summary>
        public static  string NORM_DATE_PATTERN = "yyyy-MM-dd";

        /// <summary>
        /// 标准日期时间格式，精确到秒：yyyy-MM-dd HH:mm:ss
        /// </summary>
        public static string  NORM_DATETIME_PATTERN = "yyyy-MM-dd HH:mm:ss";

        /// <summary>
        /// 标准日期时间正则，每个字段支持单个数字或2个数字，包括：
        /// <para>yyyy-MM-dd HH:mm:ss.SSSSSS</para>
        /// <para>yyyy-MM-dd HH:mm:ss.SSS</para>
        /// <para>yyyy-MM-dd HH:mm:ss</para>
        /// <para>yyyy-MM-dd HH:mm</para>
        /// <para>yyyy-MM-dd</para>
        /// </summary>
        public static string REGEX_NORM = "\\d{4}-\\d{1,2}-\\d{1,2}(\\s\\d{1,2}:\\d{1,2}(:\\d{1,2})?(.\\d{1,6})?)?";
    }
}
